package CommonGui;


import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;




public class Keys extends JPanel {
private JPanel panel1;
private JPanel panel2;
private JPanel panel3;
private JPanel panel4;
private JPanel panel5;
private JPanel panel6;


public Translate T;

	 public Keys()
	 {
		super();
		setBackground(new Color(210, 180, 140));		
		T=new Translate();
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		initialize();
	 }
	 
	 


		private void initialize()
		{
			
		T.st=new String("");
		T.TextField=new JTextField();
		T.key=new JButton[100];
		T.TextField.setPreferredSize(new Dimension(300,60));
		T.CAPS=1;
		T.init();
		
		panel1=new JPanel();
		panel1.setBackground(new Color(210, 180, 140));
		panel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5,5 ));
		for(int i=0;i<13;i++)
			
		{	
			T.key[i].setPreferredSize(new Dimension(45,40));
			T.key[i].setFont(new Font("Tahoma", Font.BOLD, 14));
			panel1.add(T.key[i]);
			
		}
		
		T.key[13].setPreferredSize(new Dimension(90,40));
		T.key[13].setFont(new Font("Tahoma", Font.BOLD, 14));
		panel1.add(T.key[13]);
		this.add(panel1);
		
		
		
		
		
		
		
	
		panel2=new JPanel();
		panel2.setBackground(new Color(210, 180, 140));
		panel2.setLayout(new FlowLayout(FlowLayout.CENTER, 5,5 ));
	    for(int i=0;i<12;i++)			
		{	
			T.key[i+14].setPreferredSize(new Dimension(45,40));
			T.key[i+14].setFont(new Font("Tahoma", Font.BOLD, 14));
			panel2.add(T.key[i+14]);			
		}
    	this.add(panel2);
	
	
	
	
	
	
	
	
	
	panel3=new JPanel();
	panel3.setBackground(new Color(210, 180, 140));
	panel3.setLayout(new FlowLayout(FlowLayout.CENTER, 5,5 ));
	for(int i=0;i<12;i++)		
	{	
		T.key[i+14+12].setPreferredSize(new Dimension(45,40));
		T.key[i+14+12].setFont(new Font("Tahoma", Font.BOLD, 14));
		panel3.add(T.key[i+14+12]);		
	}
	this.add(panel3);
	
	
	
	
	
	
	
	panel4=new JPanel();
	panel4.setBackground(new Color(210, 180, 140));
	panel4.setLayout(new FlowLayout(FlowLayout.CENTER, 5,5 ));
    for(int i=0;i<10;i++)		
	{	
		T.key[i+14+12+12].setPreferredSize(new Dimension(45,40));
		T.key[i+14+12+12].setFont(new Font("Tahoma", Font.BOLD, 14));
		panel4.add(T.key[i+14+12+12]);		
	}

    this.add(panel4);



    
    
    

	panel5=new JPanel();
	panel5.setBackground(new Color(210, 180, 140));
	panel5.setLayout(new FlowLayout(FlowLayout.CENTER, 5,5 ));	
	for(int i=0;i<3;i++)		
	{	
		T.key[i+14+12+12+10].setPreferredSize(new Dimension(90,40));
		T.key[i+14+12+12+10].setFont(new Font("Tahoma", Font.BOLD, 14));
		panel5.add(T.key[i+14+12+12+10]);	
	}	
	this.add(panel5);


	
	
	
		
		panel6=new JPanel();
		panel6.setBackground(new Color(210, 180, 140));
		panel6.setLayout(new FlowLayout(FlowLayout.CENTER, 5,5 ));
		T.TextField.setSize(300,60);	
		panel6.add(T.TextField);	 
		
		
		
	      setVisible(true);
	      if (T.TextField!=null)
	       T.listen();
	}



}
